<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>清空 localStorage 缓存</title>
    <script>
        // 清空localStorage的函数
        function clearLocalStorage() {
            localStorage.clear();
            alert('localStorage 已清空！');
        }
    </script>
</head>
<body>
    <h1>清空 localStorage 缓存</h1>
    <!-- 清空缓存的按钮 -->
    <button onclick="clearLocalStorage()">清空缓存</button>
</body>
</html>